= f.input_field :quantity_population, as: :hidden, data: { intervention_updater: prefix + 'quantity_population', intervention_handler: "quantity" }
- if reference.handlers.any?
  - options = reference.handlers.map do |handler|
    - if handler.population?
      - [Nomen::Unit.find(:unity).human_name, handler.name]
    - elsif handler.widget == :number
      - unit = handler.unit? ? handler.unit : Nomen::Unit.find(:unity)
      - ["#{unit.symbol} (#{handler.human_name})", handler.name]
    - else
      - fail "Cannot handler #{handler.widget} handlers"

  = f.input(:quantity, wrapper: :append, required: f.object.class.validators_on(:quantity_population).any? { |v| v.is_a? ActiveRecord::Validations::PresenceValidator }) do
    = f.input :quantity_value, input_html: { data: { intervention_updater: prefix + 'quantity_value', intervention_field: 'quantity-value', intervention_handler: "quantity" } }, wrapper: :simplest
    = f.input(:quantity_handler, collection: options, include_blank: false, input_html: { data: { intervention_updater: prefix + 'quantity_handler', intervention_field: 'quantity-handler', lights: '.input-append' } }, wrapper: :simplest)
    = f.error :quantity_population

    - if f.object.input?
      - real_cost = f.object.decorate.real_cost
      - unless real_cost.nil?
        .product-parameter-cost.help-block
          %span.product-parameter-cost-label= :cost.tl
          %span.product-parameter-cost-value= real_cost
